package online.longzipeng.cinemasys.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import online.longzipeng.cinemasys.dto.order.OderQueryResponse;
import online.longzipeng.cinemasys.entity.OrderHead;
import com.baomidou.mybatisplus.extension.service.IService;
import online.longzipeng.cinemasys.vo.order.OrderHeadSaveVO;
import online.longzipeng.cinemasys.vo.order.OrderHeadUpdateVO;
import online.longzipeng.cinemasys.vo.order.OrderQueryVO;
import online.longzipeng.cinemasys.vo.order.OrderSaveVO;
import org.aspectj.weaver.ast.Or;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lzp
 * @since 2021-04-09
 */
public interface OrderHeadService extends IService<OrderHead> {

    /**
     * 保存订单和订单详情，并生成订单号
     */
    String add(OrderSaveVO orderSaveVO);

    void updateOrderHead(OrderHead orderHead);

    /**
     * 条件查询所有订单带分页
     */
    IPage<OderQueryResponse> getListPage(OrderQueryVO queryVO);

    /**
     * 通过id删除订单
     */
    void delete(Long id);

    /**
     * 根据订单状态和客户id查询账单
     */
    List<OderQueryResponse> getListByCustomerAndStatus(Integer status, Long id);
}
